<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象遍历</title>

    <script>
        var student = {
            userName: '小名',
            age: 24,
            address: '火星',
            A: function(name) {
                console.log('你好' + name);
            }
        }


        for (var k in student) {
            console.log(student[k]);
        }
    </script>

</head>

<body>

</body>

</html>